import { defineStore } from "pinia";
import { store } from "@/store";
import { DataListType } from "./types";

export const useListStore = defineStore({
  id: "dataList_story",
  state: (): DataListType => ({
    subID: ""
  }),
  getters: {
    getSubID(state) {
      return state.subID;
    }
  },
  actions: {
    setSubID(subID) {
      this.subID = subID;
    }
  }
});

export function useDataListStoreHook() {
  return useListStore(store);
}
